Repository navigation
feat(nav3): [Part 8] Define size and sensitive-data policies used when converting back stack entry properties into Sentry arguments - #6705
Open
0xadam-brown wants to merge 2 commits into
Conversation
This was referenced Nov 20, 2026
Contributor
|
5 of 9 tasks
Contributor
PR risk: mediumFor commit Main concerns: data sent to Sentry, public contract, reach. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
This was referenced Nov 20, 2026
📲 Install BuildsAndroid
|
4 of 9 tasks
0xadam-brown
marked this pull request as ready for review
November 20, 2026 15:43
0xadam-brown
requested review from
markushi and
romtsn
and removed request for
a team
November 20, 2026 15:43
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Nav3 Serial Name Mappers)
📜 Description
PR provides infrastructure for serializing back stack entry properties as nav arguments, subject to size and structural limits. Applies Sentry's sensitive denylist to back stack properties, as described below.
(Note: the next PR will introduce the mapper that actually exposes this functionality to users; it and the updated sentry-docs are very explicit about the various issues surrounding sensitive data or PII that serializing entry properties can raise.)
💡 Motivation and Context
Automatically turning route properties into navigation arguments needs a consistent policy for data, payload limits, and fields that contain secrets. The built-in path should follow the same structural rules as custom mapper output.
addresses: JAVA-787 (link)
We filter sensitive data but not PII from back stack entry properties
This PR:
Sentry's sensitive data policy applies to "key-value data" SDKs send to Sentry on host app's behalf, including "HTTP headers, cookies, and URL query params". This PR extends the rule to "key-value data" of serialized back stack entry properties.
Note that I have not tried to filter personal data or PII. A few reasons for that:
BackStackEntryMapper, or by applying their own filters directly toSerialNameAndPropertiesBecause we don't remove any personal data or PII, the
sendDefaultPiiand data-collection options don't apply.In case you're curious, here's more info contrasting the behavior implemented here for Nav3 vs what we currently do for Nav2:
Chime in if you have thoughts.
We use an experimental kotlinx.serialization API
We need to run the app’s serializers while controlling where each value goes. We use an experimental kotlinx.serialization API to do so (
AbstractEncoder), which increases the need for solid R8 tests (introduced in a later PR). AbstractEncoder lets us turn serializer output directly into Sentry arguments, filter sensitive keys before retaining their values, and stop encoding when an argument limit is exceeded. It also provides the common scalar-handling behavior that we would otherwise have to implement ourselves.There are alternatives to AbstractEncoder, but they have their downsides:
💚 How did you test it?
Nav3 release build and all 752 unit tests passed. Repository-wide
make format api, Spotless checks, ABI validation, and Detekt passed. The 10 affectedHttpUtilstests also passed.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Continue with PR 9: Add SerialNameAndProperties.
#skip-changelog